﻿<UserControl 
    x:Class="Microsoft.Samples.BabelCam.Phone.PivotContent.BabelsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:tk="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    d:DataContext="{d:DesignData ../DesignData/BabelsPageViewModelSampleData.xaml}"    
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <CheckBox Grid.Row="0" IsChecked="{Binding IsPushEnabled, Mode=TwoWay}" IsEnabled="{Binding CanEnableOrDisablePush}" Content="Enable push notifications" Foreground="{StaticResource PhoneForegroundBrush}" />

            <StackPanel Grid.Row="1" Margin="12,0,0,12" Orientation="Horizontal">
                <TextBlock HorizontalAlignment="Left" Text="Connection Status:" VerticalAlignment="Bottom" TextWrapping="Wrap" />
                <TextBlock HorizontalAlignment="Left" Margin="10,0,0,0" Text="{Binding ConnectionStatus}" VerticalAlignment="Bottom" TextWrapping="Wrap" />
            </StackPanel>

            <TextBlock Grid.Row="2" Margin="12,20,12,5" TextWrapping="Wrap" FontSize="{StaticResource PhoneFontSizeLarge}" Text="babels (last on top)" />

            <ListBox Grid.Row="3" Margin="0" BorderThickness="0" ItemsSource="{Binding Babels}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Margin="20,5,12,16">
                            <TextBlock Text="{Binding}" HorizontalAlignment="Left" VerticalAlignment="Top" FontFamily="{StaticResource PhoneFontFamilyLight}" FontSize="{StaticResource PhoneFontSizeMediumLarge}" Foreground="{StaticResource PhoneForegroundBrush}" LineStackingStrategy="BlockLineHeight" LineHeight="43" TextWrapping="Wrap" />
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>

            <TextBlock Grid.Row="4" HorizontalAlignment="Left" Margin="12,2,0,5" Text="{Binding Message}" VerticalAlignment="Bottom" TextWrapping="Wrap" />

            <HyperlinkButton Grid.Row="5" Content="Translate a sample text image" NavigateUri="/Pages/UploadPhotoPage.xaml?useSampleImage=true" Visibility="{Binding IsSampleImageLinkVisisble, Converter={StaticResource VisibilityConverter}}" Margin="0,10,0,10" />
        </Grid>
    </Grid>

</UserControl>